get:
  description:
    List all running tasks.
  is: [ secured ]
  queryParameters:
    status:
      description: Filter the list of tasks by status
      enum: [ running, staging ]
  responses:
    200:
      description: The list of all tasks disregarding their status, or a list of tasks matching the specified status filter.
      body:
        application/json:
          example: !include examples/tasks.json
        text/plain:
          example: |
            frontend-foosball	10019	srv4.example.com:31292
            tools_docker_registry	5000	srv2.example.com:31721


/delete:
  post:
    description:
      Kill a list of running tasks.
    is: [ secured, deployable ]
    queryParameters:
      scale:
        type: boolean
        description: If `scale=true` is specified, then the related application is scaled down by the number of killed tasks. Only possible if `wipe=false` or not specified.
        default: false
      wipe:
        type: boolean
        description: If `wipe=true` is specified and the app uses local persistent volumes, associated dynamic reservations will be unreserved, and persistent volumes will be destroyed. Only possible if `scale=false` or not specified.
        default: false
    body:
      application/json:
        example: |
          { "ids": [ "task1", "task2" ] }
    responses:
      200:
        description: If scale=false, all tasks that were killed are returned.
          If scale=true, than a deployment is triggered and the deployment is returned.
        body:
          application/json:
            example: !include examples/tasks.json
      400:
        description: There are unknown task ids, that can not be killed.
        body:
          application/json:
            example: |
              {"message":"Invalid task id not_known"}
